2/28/2021

Outline

  • Interesting Questions
    • Why is it important
  • Datasets
    • Datasets used (source)
    • Variables and Proxy Variables
    • Potential Weaknesses
  • Data Visualization
    • Technics used for visualizing data
    • Result Plots
  • Conclusions
  • Q & A

Interesting Questions

  • How does human development influence the average temperature around the world and how does this relationship evolve over the years?
    • The relationship between gdpPercap and \(CO_2\).
    • The relationship between population and \(CO_2\).
    • The relationship between \(CO_2\) and average temperature.
  • How does the energy consumption affect the \(CO_2\) emissions around the world and how does this relationship evolve over the years?
    • The relationship between total energy consumption and \(CO_2\).
    • The relationship between different energy consumption and the total energy consumption.

Interesting Questions

  • Why is it important
    • We wanted to visualize and understand more about the effects of climate change caused from carbon dioxide and its sources such as coal, electricity, and oil. Additionally, we wanted to explore potential confounding variable that may lead to the rise of climate change such as GDP per capita.

Datasets

  • Datasets Used (Source):
    • “Coal_consumption_total.csv” (Gapminder)
    • “electricity_use_per_person.csv” (Gapminder)
    • “coal_consumption_per_cap.csv” (Gapminder)
    • “oil_consumption_per_cap. csv” (Gapminder)
    • “Income_per_person_gdppercapita_ppp_inflation_adjusted.csv” (HW1 assignment)
    • “Life_expectancy_years.csv” (HW1 assignment)
    • “Population_total.csv” (HW1 assignment)
    • “Energy_use_per_person.csv” (Gapminder)
    • “Co2_emissions_tonnes_per_person.csv” (Gapminder)
    • “GlobalLandTemperaturesByCountry.csv” (Kaggle)

Datasets

  • Variables used:
    • gdpPercap: GDP per capita
    • pop: population
    • CoalUse_pp: Coal consumption per person
    • ElecUse_pp: Electricity use per person
    • OilUse_pp: oil consumption per person
    • EnergyUse_pp: Total energy use per person
    • AverageTemperature: Average temperature for each country
    • Coal_consumption: total amount of coal consumption
    • CO2_Emissions_pp: CO2 emissions tonnes per person

Datasets

## # A tibble: 6 x 8
##   country  year EnergyUse_pp CO2_Emissions_pp gdpPercap    pop Coal_consumption
##   <fct>   <int>        <dbl>            <dbl>     <dbl>  <int>            <dbl>
## 1 Algeria  1971          233             1.26      7170 1.49e7            23000
## 2 Algeria  1972          263             1.85      8410 1.53e7            20000
## 3 Algeria  1973          307             2.44      8420 1.57e7            23000
## 4 Algeria  1974          321             1.98      8670 1.61e7            19000
## 5 Algeria  1975          332             1.93      8990 1.66e7            24000
## 6 Algeria  1976          369             2.29      9290 1.71e7            47000
## # ... with 1 more variable: continent <fct>

Datasets

  • Proxy Variables
    • EnergyUse_pp is a proxy for CO2_Emissions_pp
    • ElecUse_pp is a proxy for EnergyUse_pp
    • OilUse_pp is a proxy for EnergyUse_pp
    • pop is a proxy for CO2_Emissions_pp
    • CO2_Emissions_pp is a proxy for AverageTemperature.

Datasets

  • Potential Weaknesses
    • Missing data, which may affect the results we got.
    • Different datasets have different year range.

Data Visualization

  • Technics used for visualizing data
    • Left_join (combine data)
    • pivot_longer (pivot data from wide to long)
    • mutate (add column for data)
    • ggplot (make plots)
    • plotly (create data visualization)
    • Countrycode package (assign continent for each country)
    • Shiny app

Data Visualization

  • The relationship between gdpPercap and the \(CO_2\):

Data Visualization

  • The relationship between Population and \(CO_2\).
shinyAppFile("Energy.R", options = list())
Shiny applications not supported in static R Markdown documents

This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

Slide with Bullets

  • Bullet 1
  • Bullet 2
  • Bullet 3

Slide with R Output

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Slide with Plot

plot(pressure)